package com.mcmaster.android.menus;

import com.mcmaster.android.R;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class MainMenu extends Activity
{
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
        setContentView(R.layout.main_layout);
        
        Button main_scavenger_btn 	= (Button)findViewById(R.id.button);
        Button main_guided_btn 		= (Button)findViewById(R.id.button2);
        Button main_free_btn 		= (Button)findViewById(R.id.button3);
        
        main_scavenger_btn.setOnClickListener(new ButtonHandlerScavengerMenu());
        main_guided_btn.setOnClickListener(new ButtonHandlerGuidedMenu());
        main_free_btn.setOnClickListener(new ButtonHandlerFreeExploreMenu());
        
//        Resources res = this.getResources();
//        int imgID = getResources().getIdentifier("ic_launcher", "drawable", "com.mcmaster.android");
//        ImageView image = (ImageView) findViewById(R.id.pom);
        
//        image.setImageResource(imgID);



	}
	
	private class ButtonHandlerScavengerMenu implements View.OnClickListener {
	    public void onClick(View v) {
	    	handleScavengerClick();
	    }
	}
	
	private class ButtonHandlerGuidedMenu implements View.OnClickListener {
		public void onClick(View v) {
			handleGuidedClick();
		}
	}
	
	private class ButtonHandlerFreeExploreMenu implements View.OnClickListener {
		public void onClick(View v) {
			handleFreeExploreClick();
		}
	}
	   
	private void handleScavengerClick()
	{
		startActivity(new Intent(this, ScavengerMenu.class));
	}
	
	private void handleGuidedClick()
	{
		startActivity(new Intent(this, GuidedToursMenu.class));
	}
	
	private void handleFreeExploreClick()
	{
		startActivity(new Intent(this, FreeExploreMenu.class));
	}
	
}